import { lazy } from "react";

const routerLists = [
  {
    path: '/defaultPages',
    component: lazy(() => import('../Pages/DefaultPages')),
    children: [
      {
        path: '/defaultPages/home',
        component: lazy(() => import('../Pages/Home')),
        icon: 'home-o',
        name: '首页'
      },
      {
        path: '/defaultPages/classfly',
        component: lazy(() => import('../Pages/Classfly')),
        icon: 'apps-o',
        name: '分类'
      },
      {
        path: '/defaultPages/shop',
        component: lazy(() => import('../Pages/Shop')),
        icon: 'shopping-cart-o',
        name: '购物车'
      },
      {
        path: '/defaultPages/mine',
        component: lazy(() => import('../Pages/Mine')),
        icon: 'manager-o',
        name: '我的'
      },
      {
        from: '/defaultPages',
        to: '/defaultPages/home'
      }
    ]
  },

  {
    path: '/login',
    component: lazy(() => import('../Pages/Login'))
  },
  {
    path: '/register',
    component: lazy(() => import('../Pages/Register'))
  },
  {
    path: '/search',
    component: lazy(() => import('../Pages/Search'))
  },
  {
    from: '/',
    to: '/defaultPages'
  }
]
export default routerLists